$(function () {
	var modal = $(".cd-user-modal"),container=$(".cd-user-modal.cd-user-modal-container");

	$(".cd-signin,.js-user-login").click(function () {
        login_block();
    })


    $(".cd-signup,.js-open-register").click(function () {
        register_block();
    })

    $(".cd-close-form").click(function () {
        modal.removeClass("is-visible");
    })

	function login_block() {
        modal.addClass("is-visible");
        modal.find("#cd-signup").css({"display":"none"});
        modal.find("#cd-login").css({"display":"block"});
    }

    function register_block() {
        modal.addClass("is-visible");
        modal.find("#cd-login").css({"display":"none"});
        modal.find("#cd-signup").css({"display":"block"});
    }
})


